package com.china08.yxyapi.repository.mg.homework;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.homework.HomeworkQuesGroupRelQues;

public interface HomeworkQuesGroupRelQuesRepository extends MongoRepository<HomeworkQuesGroupRelQues, String> {

    Integer countByGroupId(String groupId);

    List<HomeworkQuesGroupRelQues> findByGroupId(String groupId);

    HomeworkQuesGroupRelQues findByQuesIdAndTeacherIdAndSchoolId(String id, String teacherId, String schoolId);

    long countByGroupIdAndStageAndSubjectAndSchoolIdAndTeacherId(String string, String phase, String subject,
            String schoolId, String userId);

    HomeworkQuesGroupRelQues findByGroupIdAndQuesIdAndTeacherIdAndSchoolIdAndStageAndSubject(String orginType,
            String quesId, String teacherId, String schoolId, String phase, String subject);

    HomeworkQuesGroupRelQues findByQuesIdAndTeacherIdAndSchoolIdAndGroupId(String string, String teacherId,
            String schoolId, String groupId);
}
